<%@page language="java" contentType="text/html; UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
<% String basePath = request.getScheme() + "://" + request.getServerName() + ":"
        + request.getServerPort() + "/" + request.getServletContext().getContextPath();
    application.setAttribute("basePath",basePath);
%>
<link rel="stylesheet" href="${basePath}/static/bootstrap/css/bootstrap.css">
<script src="${basePath}/static/js/jquery-3.3.1.min.js"></script>
<script src="${basePath}/static/bootstrap/js/bootstrap.js"></script>
<style>
    body {
        background: url("${basePath}/static/img/login.jpg");
    }

    .row {
        margin-top: 200px;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    button {
        margin-top: 20px;
        margin-left: 40%;
    }

    .msg {
        color: red;
    }
</style>
</head>
<body>
<!-- 顶部 -->
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="#">
                &nbsp;欢迎使用权限管理后台系统
            </a>
        </div>
    </div>
</nav>

<!-- 表单区 -->
<div class="container-fluid">
    <div class="row">
        <div class="col-md-2 col-md-offset-5">
            <form class="form-horizontal" method="post" action="${basePath}/system/user/login">
                <div class="form-group">
                    <label for="userName">用户名</label>
                    <input type="text" name="userName" class="form-control" id="userName" placeholder="Name">
                </div>
                <div class="form-group">
                    <label for="password">密 码</label>
                    <input type="password" name="userPwd" class="form-control" id="password" placeholder="Password">
                </div>
                <button type="submit" class="btn btn-default btn-lg btn-success">登录</button>
                <h4 class="msg">${param.msg}</h4>
            </form>
        </div>
    </div>
</div>
<script>
    ${"input"}.on("focus",function (){
        $(".msg").html("");
    })
</script>
</body>
</html>
